home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / esc.jar / com / extensibility / saf / dom / AssociatedNode.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-30  |  3.6 KB  |  137 lines

  1. package com.extensibility.saf.dom;
  2.  
  3. import org.w3c.dom.DOMException;
  4. import org.w3c.dom.Document;
  5. import org.w3c.dom.NamedNodeMap;
  6. import org.w3c.dom.Node;
  7. import org.w3c.dom.NodeList;
  8.  
  9. public class AssociatedNode extends AssociatedObject implements Node {
  10.    private Node sourceNode;
  11.  
  12.    protected AssociatedNode(Document var1) {
  13.       super((AssociatedDocument)null);
  14.       this.sourceNode = var1;
  15.    }
  16.  
  17.    protected AssociatedNode(AssociatedDocument var1, Node var2) {
  18.       super(var1);
  19.       this.sourceNode = var2;
  20.    }
  21.  
  22.    public boolean equals(Object var1) {
  23.       if (!(var1 instanceof AssociatedNode)) {
  24.          return false;
  25.       } else {
  26.          AssociatedNode var2 = (AssociatedNode)var1;
  27.          return this.sourceNode.equals(var2.sourceNode) && ((AssociatedObject)this).getAssociatedDocument().equals(((AssociatedObject)var2).getAssociatedDocument());
  28.       }
  29.    }
  30.  
  31.    public Node getSourceNode() {
  32.       return this.sourceNode;
  33.    }
  34.  
  35.    protected AssociatedNode associated(Node var1) {
  36.       return var1 == null ? null : ((AssociatedObject)this).getAssociatedDocument().getAssociatedNode(var1);
  37.    }
  38.  
  39.    public String getNodeName() {
  40.       return this.getSourceNode().getNodeName();
  41.    }
  42.  
  43.    public String getNodeValue() throws DOMException {
  44.       return this.getSourceNode().getNodeValue();
  45.    }
  46.  
  47.    public void setNodeValue(String var1) throws DOMException {
  48.       this.getSourceNode().setNodeValue(var1);
  49.    }
  50.  
  51.    public short getNodeType() {
  52.       return this.getSourceNode().getNodeType();
  53.    }
  54.  
  55.    public Node getParentNode() {
  56.       return this.associated(this.getSourceNode().getParentNode());
  57.    }
  58.  
  59.    public NodeList getChildNodes() {
  60.       return new AssociatedNodeList(((AssociatedObject)this).getAssociatedDocument(), this.getSourceNode().getChildNodes());
  61.    }
  62.  
  63.    public Node getFirstChild() {
  64.       return this.associated(this.getSourceNode().getFirstChild());
  65.    }
  66.  
  67.    public Node getLastChild() {
  68.       return this.associated(this.getSourceNode().getLastChild());
  69.    }
  70.  
  71.    public Node getPreviousSibling() {
  72.       return this.associated(this.getSourceNode().getPreviousSibling());
  73.    }
  74.  
  75.    public Node getNextSibling() {
  76.       return this.associated(this.getSourceNode().getNextSibling());
  77.    }
  78.  
  79.    public NamedNodeMap getAttributes() {
  80.       return null;
  81.    }
  82.  
  83.    public Document getOwnerDocument() {
  84.       return ((AssociatedObject)this).getAssociatedDocument();
  85.    }
  86.  
  87.    public Node insertBefore(Node var1, Node var2) throws DOMException {
  88.       return this.associated(this.getSourceNode().insertBefore(var1, var2));
  89.    }
  90.  
  91.    public Node replaceChild(Node var1, Node var2) throws DOMException {
  92.       return this.associated(this.getSourceNode().replaceChild(var1, var2));
  93.    }
  94.  
  95.    public Node removeChild(Node var1) throws DOMException {
  96.       return this.associated(this.getSourceNode().removeChild(var1));
  97.    }
  98.  
  99.    public Node appendChild(Node var1) throws DOMException {
  100.       return this.associated(this.getSourceNode().appendChild(var1));
  101.    }
  102.  
  103.    public boolean hasChildNodes() {
  104.       return this.getSourceNode().hasChildNodes();
  105.    }
  106.  
  107.    public Node cloneNode(boolean var1) {
  108.       return this.associated(this.getSourceNode().cloneNode(var1));
  109.    }
  110.  
  111.    public String toString() {
  112.       return String.valueOf(String.valueOf(String.valueOf("(").concat(String.valueOf(this.getClass().getName()))).concat(String.valueOf(")"))).concat(String.valueOf(this.getSourceNode().toString()));
  113.    }
  114.  
  115.    public void setPrefix(String var1) {
  116.    }
  117.  
  118.    public String getPrefix() {
  119.       return null;
  120.    }
  121.  
  122.    public String getNamespaceURI() {
  123.       return null;
  124.    }
  125.  
  126.    public boolean supports(String var1, String var2) {
  127.       return false;
  128.    }
  129.  
  130.    public void normalize() {
  131.    }
  132.  
  133.    public String getLocalName() {
  134.       return null;
  135.    }
  136. }
  137.